#!/usr/bin/env node

const fs = require ('fs');
const file = process.argv[2] || __filename;
/*if(!fs.existsSync(file)){
 * console.log(`${file} not exist!`);
 * return;
}*/
fs.readFile(file,'utf8',(err,data)=>{
  if(err){ 
    console.log(err.message);
    return;
  }
  const lines = data.split('\n');
  for(let i=1;i<lines.length;i++){
    console.log(`${i}\t${lines[i-1]}`);
  }
});

